package com.hdw.auth.utils;

import com.hdw.auth.bean.model.SysFuca;
import com.hdw.common.vo.LayTreeVO;

import java.util.List;
import java.util.Map;

public class AuthUtil {

    public static void fucaToMaptree(Map<String, LayTreeVO> mapTree, List<SysFuca> fucaList) {
        LayTreeVO tree;
        for(SysFuca fuca:fucaList) {
            tree = new LayTreeVO();
            tree.setId(fuca.getId()+"");
            tree.setTitle(fuca.getNa());
            tree.setParent(fuca.getIdFa()==null?"":fuca.getIdFa()+"");
            tree.setData(fuca);
            tree.setDisabled(true);
            mapTree.put(fuca.getId()+"",tree);
        }
    }
}
